package com.ruoyi.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 用户管理对象 app_user
 *
 * @author ruoyi
 * @date 2025-06-27
 */
@ApiModel(value = "AppUser", description = "用户管理对象，包含用户的基本信息")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AppUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    /** id */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "用户唯一标识ID", example = "1")
    private Long id;

    /** 用户名 */
    @Excel(name = "用户名")
    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty(value = "用户登录使用的用户名", example = "test_user", required = true)
    private String userName;

    /** 密码 */
    @Excel(name = "密码")
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度需在6到20个字符之间")
    @ApiModelProperty(value = "用户登录密码", example = "123456", required = true)
    private String password;

//    /** 手机号 */
//    @Excel(name = "手机号")
//    @ApiModelProperty(value = "用户注册使用的手机号码", example = "13800138000", required = true)
//    private String phone;

    /** 身份证号 */
    @Excel(name = "身份证号")
    @ApiModelProperty(value = "用户的身份证号码", example = "11010119900307551X", required = true)
    private String idCard;
}